package com.holly.unit.deform.designer.service.impl;


import com.holly.unit.deform.designer.mapper.DmlMapper;
import com.holly.unit.deform.designer.service.DmlService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 类描述: 通用新增修改删除SQL语句服务实现类
 *
 * @author fxr
 * @version 1.0.0
 * @date 2022/8/3 9:25
 */
@Service
@Slf4j
public class DmlServiceImpl implements DmlService {
    @Autowired
    private DmlMapper dmlMapper;

    @Override
    public boolean insert(String sql) {
        return dmlMapper.insert(sql)>0;
    }

    @Override
    public boolean update(String sql) {
        return dmlMapper.update(sql) > 0;
    }

    @Override
    public boolean delete(String sql) {
        return dmlMapper.delete(sql)>0;
    }
}
